import * as TYPES from './actionTypes'

export const toggleLogin = isLogin => ({
  type: TYPES.TOGGLE_LOGIN,
  isLogin
})

// 登录
export const saveInfo = info => {
    // console.log('save')
    return {
        type: TYPES.SAVE_USER_INFO,
        info: info,
    }
}

// 登出
export const signOut = () => {
    // localStorage.removeItem(USER_INFO)
    
    return {
        type: TYPES.SIGN_OUT,
        isLogin: false
    }
}


